/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package thienphuc.patient.dao;

import java.util.List;
import thienphuc.patient.dto.NhomThuoc;
import thienphuc.patient.dto.Thuoc;

/**
 *
 * @author QuocDat
 */
public interface ThuocDAO extends Dao<Thuoc, Integer> {
    public final static String THUOC_MA_THUOC = "maThuoc";
    public final static String THUOC_NHOM_THUOC = "nhomThuoc";
    public final static String THUOC_DON_VI_TINH = "donViTinh";
    public final static String THUOC_TEN_THUOC = "tenThuoc";
    public final static String THUOC_HINH_ANH = "hinhAnh";
    public final static String THUOC_GIA_BAN = "giaBan";
    public final static String THUOC_GHI_CHU = "ghiChu";
    public final static String THUOC_TRANG_THAI = "trangThai";
    public final static String THUOC_NHAP_THUOCS = "nhapThuocs";
    public final static String THUOC_DON_THUOCS = "donThuocs";
    
    /**
     * Find Thuoc by TenThuoc
     * @param tenThuoc
     * @return
     * @throws Exception 
     */
    List<Thuoc> findByTenThuoc(String tenThuoc) throws Exception;
    
    /**
     * Find Thuoc by TenThuoc and TrangThai
     * @param tenThuoc
     * @param trangThai
     * @return
     * @throws Exception 
     */
    List<Thuoc> findByTenThuocAndTrangThai(String tenThuoc, boolean trangThai) throws Exception;
    
    /**
     * Find Thuoc by NhomThuoc
     * @param nhomThuoc
     * @return
     * @throws Exception 
     */
    List<Thuoc> findByNhomThuoc(NhomThuoc nhomThuoc) throws Exception;
    
    /**
     * Find Thuoc by NhomThuoc and TrangThai
     * @param nhomThuoc
     * @param trangThai
     * @return
     * @throws Exception 
     */
    List<Thuoc> findByNhomThuocAndTrangThai(NhomThuoc nhomThuoc, boolean trangThai) throws Exception;
    
    /**
     * Find Thuoc by giaBanMin and giaBanMax
     * @param giaBanMin is min price
     * @param giaBanMax is max price
     * @return
     * @throws Exception 
     */
    List<Thuoc> findByGiaBan(double giaBanMin, double giaBanMax) throws Exception;
    
    /**
     * Find Thuoc by TrangThai
     * @param trangThai
     * @return
     * @throws Exception 
     */
    List<Thuoc> findByTrangThai(boolean trangThai) throws Exception;
}
